/*
 *  功能描述   : 串口接收协议
 *  说明: 接收RX数据，通过协议解析，实现改变PID等功能
 *  ----------------------------------------------------------------
 *  ----------------------------------------------------------------
 */

#ifndef __SERIAL_RX_H
#define __SERIAL_RX_H

#include "include.h"
#include "string.h"

void UART1_Receive(uint8_t RXBUF);
void UART2_Receive(uint8_t RXBUF);  
void UART3_Receive(uint8_t RXBUF);
int UART1Data_Process(uint8_t *UART_RX_BUF,uint16_t UART_STA);
int UART2Data_Process(uint8_t *UART_RX_BUF,uint16_t UART_STA);
int UART3Data_Process(uint8_t *UART_RX_BUF,uint16_t UART_STA);
int DataS_Process(uint8_t *UART_RX_BUF,uint16_t UART_STA);

void CopeSerial2Data(unsigned char ucData);
float CharToNum(uint8_t *cData,uint8_t len);

struct SAcc
{
	short a[3];
	short T;
};
struct SGyro
{
	short w[3];
	short T;
};
struct SAngle
{
	short Angle[3];
	short T;
};
extern struct SAcc 		stcAcc;
extern struct SGyro 		stcGyro;
extern struct SAngle 	stcAngle;
#endif  
	 



